<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="f" uri="/flowpage-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title><s:property value="operate"/>主表示例</title>
	<%@include file="/share/header.jsp"%>
	<script type="text/javascript" src="/easytabs/EasyTabs.js"></script>
	<link rel="stylesheet" type="text/css" href="/easytabs/EasyTabs.css">
	<s:head/>
	<f:header  theme="${sessionScope.skinCon.pageSkin}"/>	
  </head>
  <body>
    <div class="EasyTabs">
  <div class="EasyMenuBox">
    <ul class="EasyMenu">
      <li class="hover" onmouseover="EasyTabs.setTab(this)" index="1"><a href="#">用户主表</a></li>
      <li onmouseover="EasyTabs.setTab(this)" index="2"><a href="#">用户从表</a></li>
      <li onmouseover="EasyTabs.setTab(this)" index="3"><a href="#">用户附件</a></li>
    </ul>
  </div>
  <div class="EasyMainBox">
  	<div  class="EasyMain">
	   <ul class="block" index="1"><li>
	   <s:actionerror/>
	    <s:form  action="save" namespace="/demo/father" validate="true" focusElement="domain.name">
	    	<s:hidden name="domain.id"/>
	    	<s:textfield label="姓名" id="name" name="domain.name" readonly="%{readonly}" required="true" dataType="Limit" max="100" />
	    	<s:radio label="性别" name="domain.sex" noborder="true" readonly="%{readonly}" disabled="%{disabled}" required="true" list="getCodeItemList('sex')"  listKey="value" listValue="name"/>
	    	<s:textfield label="出生日期" name="domain.birthday"  readonly="%{readonly}" required="true"  dataType="Date" >
		    	<s:param name="value">
		    		<s:date name="domain.birthday" format="yyyy-MM-dd"/>
		    	</s:param>
	    	</s:textfield>
			<s:select label="状态" name="domain.state" emptyOption="true"  readonly="%{readonly}" disabled="%{disabled}" required="true" list="getCodeItemList('yes_no')"  listKey="value" listValue="name"/>	    	
	    	<s:textarea label="备注" name="domain.remark"   readonly="%{readonly}" multipleheight="3" multiplewidth="2"  dataType="Limit" max="2000" />
	    </s:form>
	    </li></ul>
	   <ul index="2"><li><iframe src="<s:url action="list" namespace='/demo/child'/>?readonly=<s:property value="readonly"/>&actionName=<s:property value="actionClass.name"/>&manyPropertyName=childs&onePropertyName=father"  class="ItemIframe" frameborder="0"></iframe></li></ul>
	   <ul index="3"><li><iframe src="<s:url action="list" namespace='/basic/documentsupload'/>?readonly=<s:property value="readonly"/>&actionName=<s:property value="actionClass.name"/>&parentId=<s:property value="domain.id"/>&fileExtensionStr=1,2,3,4"  class="ItemIframe" frameborder="0"></iframe></li></ul>
	</div>
  </div>
</div>
<br />
<br />
  </body>
  <script>
        //initialize-submit callback 
		function initializeSubmit(parameters){
			if(parameters.action==top.MyWindow.Save.action){ 
				document.getElementById("name").value="测试";
			}
			return true;
		}
		//xl 2012-05-22 保存不关闭，重写postSubmit方法
		function postSubmit(parameters){
	    		var result=top.MyWindow.defaultPostSubmit(parameters);
	    		if(result && parameters.action==top.MyWindow.SaveNoClose.action){//保存
	    			return false;
	    		}
	    		return result;
	    	}
  </script>  
</html>
